<?php

namespace backend\modules\demo\controllers;

use yii\web\Controller;


class EmailController extends Controller
{
    /**
     * Renders the index view for the module
     * @return string
     */
    public function actionIndex()
    {
        return $this->render('index');
    }
    public function actionSend(){
        Yii::$app->mailer->compose()
            ->setFrom('hi.sunbo@qq.com')
            ->setTo('250053523@qq.com')
            ->setSubject('hello sunbo')
            ->setTextBody('i am ok')
            // ->setHtmlBody('<b>HTML content</b>')
            ->send();
    }
}
